package org.hfy.entity;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;
import lombok.EqualsAndHashCode;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.Size;

/**
 * 员工实体类
 * 
 * @author hfy
 * @version 1.0
 */
@Data
@EqualsAndHashCode(callSuper = true)
@TableName("employees")
public class Employee extends BaseEntity {

    /**
     * 员工代码
     */
    @NotBlank(message = "员工代码不能为空")
    @Size(max = 20, message = "员工代码长度不能超过20个字符")
    @TableField("employee_code")
    private String employeeCode;

    /**
     * 员工姓名
     */
    @NotBlank(message = "员工姓名不能为空")
    @Size(max = 30, message = "员工姓名长度不能超过30个字符")
    @TableField("employee_name")
    private String employeeName;

    /**
     * 电话
     */
    @NotBlank(message = "电话不能为空")
    @Size(max = 20, message = "电话长度不能超过20个字符")
    @TableField("phone")
    private String phone;

    /**
     * 员工身份(manager:业务经理,admin:管理员)
     */
    @NotBlank(message = "员工身份不能为空")
    @TableField("role")
    private String role;
    
    /**
     * 密码
     */
    @TableField("password")
    private String password;

    /**
     * 状态(active:启用,inactive:停用)
     */
    @TableField("status")
    private String status;
} 